package com.zz.nondatain;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import com.zz.nondatain.base.BaseActivity;
import com.zz.nondatain.databinding.ActivityOtherBinding;
import com.zz.nondatain.utils.PrefsManager;

public class OtherActivity extends BaseActivity<ActivityOtherBinding> {

    private PrefsManager prefsManager;

    @Override
    protected void initView() {
        // 初始化PrefsManager
        prefsManager = PrefsManager.getInstance(this);
        
        // 设置标题和返回按钮
        TextView tvTitle = binding.tvTitle;
        tvTitle.setText("详细信息");
        
        binding.ivBack.setOnClickListener(v -> finish());
    }

    @Override
    protected void initData() {
        // 获取相机选择设置
        String cameraType = prefsManager.getCameraType();
        
        // 根据相机选择设置显示不同内容
        StringBuilder content = new StringBuilder();
        content.append("当前相机设置: ").append(cameraType).append("\n\n");
        
        if (cameraType.equals(PrefsManager.CAMERA_FRONT)) {
            content.append("您选择了前置摄像头，适合自拍和人脸识别。");
        } else {
            content.append("您选择了后置摄像头，适合拍摄远处物体和场景。");
        }
        
        // 设置内容
        binding.tvContent.setText(content.toString());
    }

    @Override
    protected void initObservers() {
        // 初始化观察者
    }

    @Override
    protected ActivityOtherBinding getViewBinding() {
        return ActivityOtherBinding.inflate(getLayoutInflater());
    }
} 